SET SERVER_NAME=mysql
SET IMAGE_NAME=mysql
SET VERSION=8.0.36
SET PORT=3306
SET MYSQL_ROOT_PASSWORD=ggs2024
SET DIR=/c/home/app/docker/%SERVER_NAME%

docker stop %SERVER_NAME%
docker rm %SERVER_NAME%
docker run --name %SERVER_NAME% -d ^
-p %PORT%:%PORT% ^
-v %DIR%/data:/var/lib/mysql ^
-v %DIR%/logs:/var/log/mysql ^
-e MYSQL_ROOT_PASSWORD=%MYSQL_ROOT_PASSWORD% ^
-e TZ=Asia/Shanghai ^
--restart=always %IMAGE_NAME%:%VERSION% ^
--character-set-server=utf8mb4 ^
--collation-server=utf8mb4_general_ci